package com.ecloud.gardenscenter.common.exception;

import com.ecloud.gardenscenter.common.JsonResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * JsonResult错误信息调用的传递对象
 *
 * @author Squbi
 */
public class JsonResultException extends RuntimeException {
    private final JsonResult jsonResult;

    public JsonResultException(JsonResult jsonResult) {
        this.jsonResult = jsonResult;
    }

    @Override
    public String getMessage() {
        return jsonResult.toString();
    }

    public JsonResult getJsonResult() {
        return jsonResult;
    }
}
